<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" href="css/amazeui.min.css" />
		<link rel="stylesheet" href="css/admin.css" />
	</head>

	<body>
		<div class="admin-content-body">
			<div class="am-cf am-padding am-padding-bottom-0">
				<div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">订阅信息管理</strong><small></small></div>
			</div>

			<hr>

			<div class="am-g">
				<div class="am-u-sm-12 am-u-md-6">
					<div class="am-btn-toolbar">
						<div class="am-btn-group am-btn-group-xs">
							<button type="button" class="am-btn am-btn-default"><span class="am-icon-plus"></span> 新增</button>
						</div>
					</div>
				</div>
				<div class="am-u-sm-12 am-u-md-3">

				</div>
				<div class="am-u-sm-12 am-u-md-3">
					<div class="am-input-group am-input-group-sm">
						<input type="text" class="am-form-field">
						<span class="am-input-group-btn">
            <form id="myform"> <button class="am-btn am-btn-default" type="button">搜索</button>
           <input type="hidden" name="index" id="index" value="1"/>
         <input type="hidden" name="size" id="size" value="5"/>
           </form>
          </span>
					</div>
				</div>
			</div>
			<div class="am-g">
				<div class="am-u-sm-12">
					<form class="am-form">
						<table class="am-table am-table-striped am-table-hover table-main">
							<thead>
								<tr>
									<th class="table-check"><input type="checkbox"></th>
									<th class="table-id">ID</th>
									<th class="table-title">接收邮箱</th>
									<th class="table-title">职位名称</th>
									<th class="table-title">工作地点</th>
									<th class="table-title">月薪</th>
									<th class="table-set">操作</th>
								</tr>
							</thead>
							<tbody>

							</tbody>
						</table>
						<div class="am-cf">
							第<span class="currentpage"></span>页
							/ 共<span class="totalpage"></span>页
							<div class="am-fr">
								<ul class="am-pagination">
									<li class="am-disabled"> <a href="javascript:;" class="prev">上一页</a></li>
									<li> <a href="javascript:;" class="next">下一页</a></li>
								</ul>
							</div>
						</div>
						<hr>
					</form>
				</div>

			</div>
		</div>

		<script type="text/javascript" src="js/jquery-1.12.4.js"></script>
		<script>
			$( function(){

				function shows(){
                    $.get("/getSubscription.json",$("#myform").serialize(),function (data) {
                        $(".currentpage").text(data.pageIndex);
                        $(".totalpage").text(data.totalPage);
                        $("tbody").empty();
                        for (var i=0;i<data.list.length;i++){
                            var subscription=data.list[i];

                            var  str="<tr><td><input type=\"checkbox\"></td><td>"+subscription.id+"</td><td>"+subscription.email
                                +"</td><td>"+subscription.jobtitle+"</td><td>"+subscription.workcity+"</td><td>"+subscription.salaryRange+"</td>" +
                                "<td><div class=\"am-btn-toolbar\">\n" +
                                "<div class=\"am-btn-group am-btn-group-xs\">\n" +
                                "<button type=\"button\"  class=\"btnedit am-btn am-btn-default am-btn-xs am-text-secondary\"> <span class=\"am-icon-pencil-square-o\"></span> 编辑</button>\n" +
                                "<button class=\"am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only\"><span class=\"am-icon-trash-o\"></span> 删除</button>\n" +
                                "</div>\n" +
                                "</div></td></tr>";
                            $("tbody").append(str);
                        };


                    },"json");
				}
				shows();
				
			})
		</script>

	</body>

</html>